package gui.cliente;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ModificaNumeroTelJPanel extends javax.swing.JPanel {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JPanel numerojPanel;
	private JLabel logojLabel;
	private JButton chiudijButton;
	private JButton salvajButton;
	private JPanel pulsantijPanel;
	private JTextField numeroTeljTextField;
	private JLabel numeroTelefonicojLabel;
	private JPanel logojPanel;
	
	private String numeroTelefono;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new ModificaNumeroTelJPanel("3881915856"));
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public ModificaNumeroTelJPanel(String numero) {
		super();
		numeroTelefono = numero;
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(365, 220));
			{
				numerojPanel = new JPanel();
				GridBagLayout numerojPanelLayout = new GridBagLayout();
				numerojPanelLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
				numerojPanelLayout.rowHeights = new int[] {7, 7, 7, 7};
				numerojPanelLayout.columnWeights = new double[] {0.1};
				numerojPanelLayout.columnWidths = new int[] {7};
				numerojPanel.setLayout(numerojPanelLayout);
				this.add(numerojPanel);
				numerojPanel.setPreferredSize(new java.awt.Dimension(185, 149));
				numerojPanel.setBorder(BorderFactory.createTitledBorder("Modifica Recapito Telefonico"));
				{
					numeroTelefonicojLabel = new JLabel();
					numerojPanel.add(numeroTelefonicojLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.SOUTH, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					numeroTelefonicojLabel.setText("Numero Telefonico:");
					numeroTelefonicojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					numeroTeljTextField = new JTextField();
					numerojPanel.add(numeroTeljTextField, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
					numeroTeljTextField.setText(this.numeroTelefono);
				}
			}
			{
				logojPanel = new JPanel();
				this.add(logojPanel);
				logojPanel.setPreferredSize(new java.awt.Dimension(159, 139));
				{
					logojLabel = new JLabel();
					logojPanel.add(logojLabel);
					logojLabel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/phone128.png")));
					logojLabel.setPreferredSize(new java.awt.Dimension(129, 136));
				}
			}
			{
				pulsantijPanel = new JPanel();
				this.add(pulsantijPanel);
				pulsantijPanel.setPreferredSize(new java.awt.Dimension(338, 48));
				{
					salvajButton = new JButton();
					pulsantijPanel.add(salvajButton);
					salvajButton.setText("Salva Modifiche Numero");
					salvajButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/save-icon32.png")));
				}
				{
					chiudijButton = new JButton();
					pulsantijPanel.add(chiudijButton);
					chiudijButton.setText("Chiudi Finestra");
					chiudijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/close32.png")));
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
